<template>
  <div>
    <input type="text" v-model.number="a">
    <input type="text" v-model.number="b">
    <button @click="add">+</button>
    <hr/>
    <input type="text" @input="fn" v-model.trim="msg">
    <hr/>
    <input type="text"  v-model.lazy="msg1">
  </div>
</template>

<script>
export default {
  data(){
    return {
      a:1,
      b:2,
      msg:'',
      msg1:'',
    }
  },
  methods:{
    add(){
      console.log(this.a+this.b)
    },
    fn(){
      console.log(this.msg)
    }
  }
}
</script>

<style scoped>

</style>
